home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / jazlib.arc / JZLFTSTR.C < prev    next >
Text File  |  1988-12-18  |  522b  |  21 lines

  1. /*
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │jzlftstr.c                                     │
  4. │Return the left n chars from a string                         │
  5. │                                         │
  6. │ (C) JazSoft Software by Jack A. Zucker (301) 794-5950              │
  7. └────────────────────────────────────────────────────────────────────────────┘
  8. */
  9.  
  10. char *jzlftstr(fstr,fnum)
  11. char *fstr;
  12. int fnum;
  13. {
  14.   static char wstr[256];
  15.  
  16.   strncpy(wstr,fstr,fnum);
  17.   *(wstr+fnum) = 0;            /* put in the terminating byte */
  18.  
  19.   return(wstr);
  20. }
  21.